<script type="text/javascript">
$(function () {
	var url = '${contextPath}script/site/category.js?time=' + sys_get_time();
	$.ajax({url:url, dataType:'script', cache:true,
		success: function(){
		}
	});
});
</script>
<#import "/freemarker/modeltype.ftl" as mt>
<div class="widget" style="width:450px; float:left;">
	<div class="widget-header">
		<h3 class="title"><i class="fontello-icon-th-list-1"></i> 编辑商品类型信息</h3>
	</div>
	<div class="widget-content">
		<div class="widget-content">
			<div class="table-title">
				<form id="editCategoryForm">
					<table class="table boo-table">
						<tr>
							<td>类型名称 </td>
							<td>
								<input type="text" id="name" name="name" value="${(info.name)!''}"/>
								<input type="hidden" name="code" value="${(info.code)!''}"/>
							</td>
						</tr>
						<tr>
							<td>父类型</td>
							<td>
								<div >
									<input type="text" id="pn" name="pn" readonly="readonly" value="${(info.pn)!'0'}"/>
									<input type="hidden" id="pc" name="pc" value="${(info.pc)!'0'}"/>
									<button class="btn btn-primary" onclick="javascript: selectCategory();" title="选择商品类型" type="button"><i class="icon-search"></i></button>
									<button class="btn btn-danger" onclick="javascript: $('#pn').val('0'); $('#pc').val('');" title="重置" type="button"><i class="icon-remove"></i></button>
								</div>
							</td>
						</tr>
					</table>
				</form>
			</div>
			<div>
				<ul>
					<li style="text-align:center; margin-top: 10px;">
						<a href="#" class="btn btn-info" onclick="javascript: checkedCategory();"> 
							<i class="fontello-icon-floppy"></i>&nbsp;保&nbsp;&nbsp;存
						</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="#" class="btn btn-info" onclick="javascript:editCategory('','');; return false;">
							<i class="fontello-icon-block"></i>&nbsp;重&nbsp;&nbsp;置
						</a>
					</li>
				</ul>
			</div>
		</div>
	</div>
</div>
